package com.how.config.base;

import java.util.Properties;

public abstract class DataSourceBase {

    public static final String BASEDATABASE = "base";
    public static final String CONSOLEDATABASE = "console";
    public static final String CONSOLEDATABASE_0 = "console0";
    public static final String CONSOLEDATABASE_1 = "console1";

    // 配置
    public static Properties getProperties() {
        Properties properties = new Properties();
        //是否打印SQL解析和改写日志
        properties.setProperty("sql.show", Boolean.TRUE.toString());
        //用于SQL执行的工作线程数量，为零则表示无限制
        properties.setProperty("executor.size", "4");
        //每个物理数据库为每次查询分配的最大连接数量
        properties.setProperty("max.connections.size.per.query", "1");
        //是否在启动时检查分表元数据一致性
        properties.setProperty("check.table.metadata.enabled", "false");
        return properties;
    }
}
